]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: don't force size on folder icon actor
authorCosimo Cecchi <cosimoc@gnome.org>
Sun, 16 Feb 2014 06:06:53 +0000 (22:06 -0800)
committerCosimo Cecchi <cosimoc@gnome.org>
Sun, 16 Feb 2014 15:49:25 +0000 (07:49 -0800)
Use a table layout instead.

https://bugzilla.gnome.org/show_bug.cgi?id=705410

js/ui/appDisplay.js

index e2db974b36b9b70cfbe43534b8ea32ccb89e5788..7d37798e2a25d278b8dcb817e58597460ca2d524 100644 (file)
@@ -924,9 +924,9 @@ const FolderView = new Lang.Class({
     },
 
     createFolderIcon: function(size) {
-        let icon = new St.Widget({ layout_manager: new Clutter.BinLayout(),
-                                   style_class: 'app-folder-icon',
-                                   width: size, height: size });
+        let layout = new Clutter.TableLayout();
+        let icon = new St.Widget({ layout_manager: layout,
+                                   style_class: 'app-folder-icon' });
         let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
 
         let aligns = [ Clutter.ActorAlign.START, Clutter.ActorAlign.END ];
@@ -936,7 +936,7 @@ const FolderView = new Lang.Class({
                                    x_expand: true, y_expand: true });
             bin.set_x_align(aligns[i % 2]);
             bin.set_y_align(aligns[Math.floor(i / 2)]);
-            icon.add_actor(bin);
+            layout.pack(bin, i % 2, Math.floor(i / 2));
         }
 
         return icon;